--Invoke libraries
--local tablet = AceLibrary("Tablet-2.0");

--Define the plugin
fListFu = AceLibrary("AceAddon-2.0"):new("AceEvent-2.0", "AceDB-2.0", "FuBarPlugin-2.0")
local addon = fListFu

addon.title = "fListFu"
addon.hasIcon = "Interface\\Icons\\INV_Box_01";
addon.defaultPosition = "CENTER";
addon.defaultMinimapPosition = 180;
addon.cannotDetachTooltip = true;

-- Activate menu options to hide icon/text (no point in having the colour option)
addon.hasNoColor = true;
addon:RegisterDB("fListFuDB");

--Make sure the plugin is the right format when activated
function addon:OnEnable()
    self:Update();
end

--Define text to display when the cursor mouses over the plugin
function addon:OnTooltipUpdate()
	--local cat = tablet:AddCategory()
	--	cat:AddLine(
	--		"text", ATLASLOOTFU_LEFTCLICK
	--	)
	--	cat:AddLine(
	--		"text", ATLASLOOTFU_SHIFTCLICK
	--	)
    --    cat:AddLine(
	--		"text", ATLASLOOTFU_LEFTDRAG
	--	)
end

--Define what to do when the plugin is clicked
function addon:OnClick(button)
    --Left click -> open loot browser
    --Shift Left Click -> show options menu
    --Right click -> standard FuBar options
	if IsShiftKeyDown() then
        --AtlasLootOptions_Toggle();
        self:Print("ShiftKeyDown")
    else
        --if AtlasLootDefaultFrame:IsVisible() then
        --    AtlasLootDefaultFrame:Hide();
        --else
        --    AtlasLootDefaultFrame:Show();
        --end
    end
end
